package cn.fj.hrm.client;

import cn.fj.hrm.basic.util.JsonResult;
import cn.fj.hrm.domain.Msg;
import cn.fj.hrm.fallback.MsgSenderClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@Component
@FeignClient(value = "SERVICE-MSGSENDER", fallbackFactory = MsgSenderClientFallbackFactory.class)
public interface MsgSenderClient {

    /**
     * 发送消息到消息队列的公共接口
     * @param msg
     * @return
     */
    @PostMapping("/msgSender/send")
    JsonResult sendMsg(@RequestBody Msg msg);
}
